import Users
admin = {'account': 'admin', 'password': '123456'}

account1 = input("请输入管理员账户：")
password1 = input("请输入管理员密码：")
if account1 == admin['account'] and password1 == admin['password']:
    print("登录成功！")
    a = int(input("请选择操作：1. 添加账务 2.编辑账务 3.删除帐务 4.查询账务 5.退出系统\n"))
    if a == 1:
        add = input("请添加账务的ID：")
        Users.ID.append(add)
        print("添加成功！")
        print(Users.ID)
    elif a == 2:
        update = input("请选择编辑项目：1.类别 2.账户 3.金额 4.时间 5.说明\n")
        if update == 1:
            print(Users.kinds)
            b = input("选择修改内容\n")
            c = Users.kinds.index(b)
            var = Users.kinds[c] == b
            print(Users.kinds)
    elif a == 3:
        dele = int(input("请选择删除账务：[0-13]:"))
        if dele in Users.ID.index:
            Users.ID.remove(dele)
            print("删除成功！")
            print(Users.ID)
        else:
            print("输入有误！")
    elif a == 4:
        search = input("请选择查询账务：1. 类别 2.账户 3.金额 4.时间 5.说明\n")
        if search == 1:
            print(Users.kinds)
        elif search == 2:
            print(Users.zhanghu)
        elif search == 3:
            print(Users.count)
        elif search == 4:
            print(Users.time)
        elif search == 5:
            print(Users.explan)
    elif a == 5:
        print("退出系统！")
elif account1 != admin['account'] and account1 == admin['password']:
    print("账户输入错误！")
elif account1 == admin['account'] and account1 != admin['password']:
    print("密码输入错误！")
else:
    print("账户或密码输入错误！")